<!-- $Id: agency_list.htm 14216 2008-03-10 02:27:21Z testyang $ -->
{if $cha}
{include file="scan_filter.htm"}
{/if}
{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}
<script type="text/javascript" src="../js/calendar.php?lang="></script>
<link href="../js/calendar/calendar.css" rel="stylesheet" type="text/css" />
<div class="form-div">
<strong>温馨提示：</strong> 
        <span id='ts'>您出库的商品数不能大于总库存数量，否则会失败哦！</span>
</div>
{if $goodsinfo}
<form method="post" action="" name="listForm">
<div class="list-div" id="listDiv">

	<table cellpadding="5" cellspacing="1" width="100%" border=0 bgcolor="#E6E6E6">
        <tr>
	  	  <th width="10%" align="center"  bgcolor="#F9F9F9">商品条形码</th>
          <th width="15%" align="center"  bgcolor="#F9F9F9">商品信息</th>
          <th width="20%" align="center"  bgcolor="#F9F9F9">商品名称</th>
          <th width="15%" align="center"  bgcolor="#F9F9F9">价格</th>
          <th width="15%" align="center"  bgcolor="#F9F9F9">属性</th>
          <th width="7%" align="center"  bgcolor="#F9F9F9">总库存</th>
          <th width="10%" align="center"  bgcolor="#F9F9F9">出库数量</th>
          <th width="8%" align="center"  bgcolor="#F9F9F9">操作</th>
        </tr>
        <!--{foreach from=$goodsinfo item=ginfo name=name key=key}--> 
        <tr id="info{$key}">
	  <td align="center" bgcolor="#FFFFFF">
          	{$key}
          </td>
          <td align="center" bgcolor="#FFFFFF">
          	<a href="{$ginfo.url}" target="_blank" title="{$ginfo.goods_name}" class="goods_img">
            	<img src="{$ginfo.goods_img}"  width="50" height="50"/>
            </a>
          </td>
          <td align="left" bgcolor="#FFFFFF">
          	<a href="{$ginfo.url}" target="_blank" title="{$ginfo.goods_name}">{$ginfo.goods_name}</a>
          </td>
          <td align="center" bgcolor="#FFFFFF">
          	<p>当前售价：<font color="#E31939">{$ginfo.goods_price}</font></p>
            <p><del>市场价：{$ginfo.market_price}</del></p>
          </td>
          <td align="center" bgcolor="#FFFFFF">
	  {if $ginfo.goods_attr}
	  <!--{foreach from=$ginfo.goods_attr item=attr}--> 
          	<p>{$attr}</p>
	  <!--{/foreach}-->
          {/if}
          </td>
          <td align="center" bgcolor="#FFFFFF">
          	{$ginfo.goods_number}
          </td>
          <td align="center" bgcolor="#FFFFFF">
          	<input type="text" name="number[{$key}]" value="{$ginfo.buy_number}" class="scan_con_num" />
          </td>
          <td align="center" bgcolor="#FFFFFF"><a href="javascript:void(0);" title="删除该商品" class="scan_del" onclick="delgood('{$key}')">删除</a></td>
        </tr>
        <!--{/foreach}-->
        <tr>
        	<td colspan="8" align="center" bgcolor="#FFFFFF" class="scan_con_te">
            	<input type="submit" class="button" value="确认出库" class="scan_con_sub" />
				<input type="hidden" value="outstore" name="act">
				<input type="button" class="button" value="取消" class="scan_con_sub" onclick="javascript:gourl();" />
            </td>
        </tr>
    </table>

</div>
</form>
{/if}
<script>
function gourl(){
	self.location.href='scan.php?act=insert';
}
function delgood(id){
	document.getElementById("info"+id).remove();
}
</script>
{include file="pagefooter.htm"}